$(document).ready();

$('#qna_form').submit(
    function() {
        alert("submit!");
        var author_frm = $('#qna_form_author').val();
        var title_frm = $('#qna_form_title').val();
        var content_frm = $('#qna_form_content').val();
        alert(title_frm);
        $.post(
            "/api/posting",
            {
                Posting: {
                    author: author_frm,
                    title: title_frm,
                    content: content_frm
                }
            },
            function(data) {
                alert(data);
            },
            "json"
        );
        return false;
    }
);
